<?php
namespace app\user\model;
use app\common\model\Wishs as commonWishs;
use think\Lang;
/**
* 心愿单模型类
* @method createWish([['region' => 22, 'start_date' => '2016-12-13', 'end_date' => '2016-12-21', 'score' => 700, 'offer' => 97], ['region' => 19, 'start_date' => '2016-12-8', 'end_date' => '2016-12-10', 'score' => 652, 'offer' => 60]]);
* @method bool cancelMeetTheDemand(array|string $wish_id) 取消满足需求
* @method bool meetTheDemand(array|string $wish_id) 满足需求
* @method bool cancelWish() 取消心愿
*/
class Wishs extends commonWishs
{
	public function getRegionTextAttr($value,$data){
	    $status = [
			'Beijing'  => 0, 
    		'Shanghai' => 1,
    		'Sanya'    => 2,
    		'Chengdu'  => 3,
    		'Xian'     => 4
		];
	   return $status[$data['region']];
	}
}
